<gm:page title="Item to list" authenticate="true">

  <!--
    This sample demonstrates how you can use the item control as a
    form to submit data. The item shows up in the list below once
    saved.
    @author: GME Team
  -->
  
  <h1>Saving data via a form</h1>
  <p>Enter data into the form below. See the data appear when you save.</p>

  <table>
    <tr>
      <td style="padding-bottom:20px">
        <gm:item template="t" data="${app}/test" create="true" />
      </td>
    </tr>
    <tr>
      <td>
        <gm:list data="${app}/test" />
      </td>
    </tr>
   </table>

   <gm:template id="t">
     <table>
       <tr>
         <td>Title:</td>
         <td><gm:text ref="atom:title"/></td>
       </tr>
       <tr>
         <td>Date:</td>
         <td><gm:date ref="gd:when/@startTime"/></td>
       </tr>
       <tr>
         <td colspan="2" style="padding-top:10px"><gm:editButtons text="true"/></td>
       </tr>
     </table>
   </gm:template>

</gm:page>

